﻿#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <stdlib.h>

int main()
{
	double numberA, numberB;
	char operator[2];
	double ans = 0.0;
	while (1) {

		scanf("%lf%s%lf", &numberA, operator, &numberB);

		/* 根据符号执行相应的运算 */
		switch (operator[0])
		{
		case '+':
		{
			ans = numberA + numberB;
			break;
		}
		case '-':
		{
			ans = numberA - numberB;
			break;
		}
		case '*':
		{
			ans = numberA * numberB;
			break;
		}
		case '/':
		{
			if (numberB == 0) {
				puts("除数不能为0！");
				continue;
			}
			ans = numberA / numberB;
			break;
		}
		default: {
			puts("未定义此符号的运算！");
			continue;
			break;
		}
		}
		printf("%g %s %g = %g\n", numberA, operator,numberB, ans);
	}
	return 0;
}
